package com.xuyuan.protocol;

import jakarta.annotation.Resource;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;


@SpringBootTest
public class MyCustomProtocolTest {

    @Resource
    MyCustomProtocolClient client;

    @Test
    public void testCustomProtocol() {
        MyCustomProtocol request = new MyCustomProtocol();
        request.setType(1);
        request.setContent("Hello from client");

        MyCustomProtocol response = client.sendCustomProtocol("http://localhost:8080/custom-protocol", request);
        System.out.println("Received response: " + response);
    }
}
